<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/common/_includes.jsp" %>
<jsp:include page="/WEB-INF/jsp/common/_scripts.jsp" />
<!DOCTYPE html>
<html>
<head>
<title>Module Add</title>
</head>
<body>
	<div class="ui grid">
		<div class="row">
			<div class="column">
				<div class="ui two column grid">
					<div id="container" class="thirteen wide column">
						<div class="alert alert-success w200 center-block text-center "
							style="display: none;" role="alert"></div>
						<ol class="breadcrumb">
							<li></li>
						</ol>
						<form class="form-horizontal" id="addForm" method="post"
							action="/module/add">
							<input type="hidden" id="js_level" name="level">
							<input type="hidden" id="js_name" name="name">
							<input type="hidden" id="js_code" name="code">
							<input type="hidden" id="js_modulePath" name="modulePath">
							<div class="form-group">
								<label class="col-sm-3 control-label">模块名称</label>
								<div class="col-sm-5">
									<select class="form-control" id="js_channelName" name="channelName">
										<option value="">请选择栏目</option>
										<c:forEach items="${channelList}" var="channel">
											<option value="${channel.code}">${channel.name}</option>
										</c:forEach>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">是否启用</label>
								<div class="col-sm-5 desc">
									<label class="radio-inline"> <input type="radio"
										name="isUse" value="0" checked="checked">启用 </label> <label
										class="radio-inline"> <input type="radio" name="isUse"
										value="1">禁用</label>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">是否侧栏</label>
								<div class="col-sm-5 desc">
									<label class="radio-inline"> <input type="radio"
										name="isSidebar" value="0" checked="checked">正栏 </label> <label
										class="radio-inline"> <input type="radio"
										name="isSidebar" value="1">侧栏 </label>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">排序号</label>
								<div class="col-sm-5">
									<input type="text" class="form-control" id="priority"
										name="priority" placeholder="输入排序号">
								</div>
							</div>

							<div class="form-group" id="js_submit">
								<div class="col-sm-offset-3 col-sm-2">
									<button type="submit" class="btn btn-success">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<script type="text/javascript"
		src="/static/vendor/jquery.validate/jquery.validate.js"></script>
	<script type="text/javascript" src="/static/js/module/add.js"></script>
	<script type="text/javascript">
		$(function() {
			$("ol.breadcrumb>li").text("当前目录：" + window.parent.nodeName);
			$("#js_level").val(window.parent.nodeId);
		}); 
	</script>
</body>
</html>